package com.qf.dao.impl;

import com.qf.dao.DeveloperDao;
import com.qf.pojo.Developer;
import com.qf.pojo.Project;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Description: 公用常量
 * @Data: 2022/9/2 15:15
 * @Pacakge: com.qf.dao.impl
 * @ClassName: DeveloperDaoImpl
 * @Author: fan
 */
@Repository("developerDao")
public class DeveloperDaoImpl implements DeveloperDao {
    @Autowired
    private JdbcTemplate jdbcTemplate;
    /**
     * 查询工程的同时查询Developer开发商
     * @param did 开发商编号
     * @return 开发商
     */
    @Override
    public List<Developer> selectDeveloperByDid(String did) {
        return jdbcTemplate.query("select * from developer where did = ? and status=1",new BeanPropertyRowMapper<Developer>(Developer.class),did);

    }
}
